package com.hsgene.order.persistence;

import com.hsgene.order.condition.SettlementExportCondition;
import com.hsgene.order.domain.reconciliation.ReconciliationConditionDto;
import com.hsgene.order.domain.reconciliation.ReconciliationListInfo;
import com.hsgene.order.domain.reconciliation.ReconciliationPayAgencyInfo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * @author wxf
 * @date 2018/11/7 15:30
 **/
public interface ReconciliationRepository {
    /**
     * 获取对账列表信息
     *
     * @param conditionDto 参数对象
     * @param offset
     * @param size
     * @return
     */
    List<ReconciliationListInfo> getReconciliation(@Param("conditionDto") ReconciliationConditionDto conditionDto,
                                                   @Param("offset") Integer offset,
                                                   @Param("size") Integer size);

    /**
     * 计算总数
     *
     * @param conditionDto
     * @return
     */
    Integer getReconciliationSumCount(@Param("conditionDto") ReconciliationConditionDto conditionDto);

    /**
     * 获取导出信息
     *
     * @param exportCondition exportCondition
     * @return
     */
    List<ReconciliationListInfo> getExportInfo(@Param("conditionDto") SettlementExportCondition exportCondition);

    /**
     * 校验数据更新对账
     * @param payOrderId 支付单号
     * @param amount 金额
     * @param time 时间
     * @return
     */
    Boolean checkUpdateReconciliation(@Param("payOrderId") String payOrderId, @Param("amount")Double amount,
                                      @Param("time")Date time);

    /**
     * 获取支付机构
     * @return
     */
    List<ReconciliationPayAgencyInfo> getPayAgencyInfo();

    /**
     * 导出选中
     * @param rowIds
     * @return
     */
    List<ReconciliationListInfo> getExportInfoByIds(@Param("ids") List<String> rowIds);
}
